<template>
  <div class="home">
    <head-nav
      :province='province'
      setCurrYear='setCurrYear'
    ></head-nav>
    <div class="content-box">
      <div class="left-box">
        <project-num-contract class="chart-box-item"></project-num-contract>
        <div class="chart-box-item"></div>
        <div class="chart-box-item"></div>
      </div>
      <div class="center-box">
        <china-map
          @setCurrProvince='setCurrProvince'
          class="map-box"
        ></china-map>
        <scene-monitoring></scene-monitoring>
      </div>
      <div class="right-box">
        <div class="chart-box-item"></div>
        <div class="chart-box-item"></div>
        <div class="chart-box-item"></div>
      </div>
    </div>
    <!-- <div class="china-province-box">
      <china-map @setCurrProvince='setCurrProvince'></china-map>
      <scene-monitoring></scene-monitoring>
    </div>
    <div class="china-province-box">
      <project-type-pie class="chart-box-item"></project-type-pie>
      <project-cost-pie class="chart-box-item"></project-cost-pie>
    </div>
    <div class="china-province-box">
      <project-num-money class="chart-box-item"></project-num-money>
      <carry-prize-num-type class="chart-box-item"></carry-prize-num-type>
    </div>
    <div class="china-province-box year-project-data">
      <project-bar-data class="chart-box-item"></project-bar-data>
    </div> -->
  </div>
</template>

<script>
import HeadNav from "@/components/HeadNav";
import ChinaMap from "@/components/ChinaMap";
import SceneMonitoring from "@/components/SceneMonitoring";
// import ProjectTypePie from "@/components/ProjectTypePie";
// import ProjectCostPie from "@/components/ProjectCostPie";
// import ProjectNumMoney from "@/components/ProjectNumMoney";
// import CarryPrizeNumType from "@/components/CarryPrizeNumType";
// import ProjectBarData from "@/components/ProjectBarData";

import ProjectNumContract from "@/components/ProjectNumContract";

export default {
  name: "Home",
  components: {
    HeadNav,
    ChinaMap,
    SceneMonitoring,
    // ProjectTypePie,
    // ProjectCostPie,
    // ProjectNumMoney,
    // CarryPrizeNumType,
    // ProjectBarData,
    ProjectNumContract,
  },
  data() {
    return {
      province: "全国", // 当前区域
      year: new Date(), // 当前年
    };
  },
  created() {},
  methods: {
    //  设置当前省份
    setCurrProvince(province) {
      this.province = province;
    },
    // 设置当前年
    setCurrYear(year) {
      this.year = year;
    },
  },
};
</script>
<style lang="less" scoped>
@import "../common/css/common";
.home {
  width: 100%;
  height: auto;
  box-sizing: border-box;
  margin: 0 auto;
  padding-bottom: 100px;
  background: #f7f9fc;
}
.content-box {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 54px;
  box-sizing: border-box;
  margin-top: 20px;
  .left-box,
  .right-box,
  .center-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    height: auto;
    .chart-box-item {
      width: 100%;
      height: 250px;
      background: pink;
      margin-bottom: 24px;
    }
  }
  .left-box,
  .right-box {
    width: 30%;
  }
  .center-box {
    width: 38%;
    .map-box {
      width: 100%;
      height: 300px;
      margin-bottom: 50px;
    }
  }
}
// .china-province-box {
//   display: flex;
//   flex-direction: row;
//   justify-content: space-between;
//   align-items: flex-start;
//   width: 100%;
//   padding: 0 54px;
//   box-sizing: border-box;
//   margin-top: 20px;
// }
// .china-province-box:last-child {
//   margin-bottom: 20px;
// }
// .chart-box-item {
//   width: 48%;
// }
// .year-project-data.china-province-box {
//   .chart-box-item {
//     width: 100%;
//   }
// }
</style>
